package com.fi.common.log;

import com.fi.common.file.FileTool;

import fivm.cross.platform.steamobj.log.LogConfigStream;

public class LogNative implements ILogger {

	public LogConfigStream logConfig;
	public LogNative(LogConfigStream logConfig){
		this.logConfig=logConfig;
	}

	public void logToClient(String msg){
		String logPath_="";
		if(logConfig.isEnableWindowsTestCase()){
			logPath_=logConfig.getLogWinClientFilePath();
		} else {
			logPath_=logConfig.getLogDroidClientFilePath();
		}
		FileTool.writeFile(logPath_,msg);
	}

	
	public void log(int level, String tag, String msg) {
		logToClient(FiLog.formatLog(tag, level, msg));
	}
	
}
